package com.racedepartment.model;

public class Mapping extends Model{

	private int mapping_sk;
	private int mode_sk;
	private boolean is_function;
	private String button;
	private String execute;
	
	public static final String TABLE_NAME = "MAPPING";
	
	public static final String MAPPING_SK = "MAPPING_SK";
	public static final String MODE_SK = "MODE_SK";
	public static final String IS_FUNCTION = "IS_FUNCTION";
	public static final String BUTTON = "BUTTON";
	public static final String EXECUTE = "EXECUTE";
	public static final String[] FIELDS = {MAPPING_SK, MODE_SK, IS_FUNCTION, BUTTON, EXECUTE};
	public static final int[] DATATYPES = {DATATYPE_INT, DATATYPE_INT, DATATYPE_BOOLEAN, DATATYPE_TEXT, DATATYPE_TEXT};	
	
	
	/**
	 * @param mapping_sk
	 * @param mode_sk
	 * @param is_function
	 * @param button
	 * @param execute
	 */
	public Mapping(int mapping_sk, int mode_sk, boolean is_function,
			String button, String execute) {
		super();
		this.mapping_sk = mapping_sk;
		this.mode_sk = mode_sk;
		this.is_function = is_function;
		this.button = button;
		this.execute = execute;
	}
	/**
	 * @return the mapping_sk
	 */
	public int getMapping_sk() {
		return mapping_sk;
	}
	/**
	 * @param mapping_sk the mapping_sk to set
	 */
	public void setMapping_sk(int mapping_sk) {
		this.mapping_sk = mapping_sk;
	}
	/**
	 * @return the mode_sk
	 */
	public int getMode_sk() {
		return mode_sk;
	}
	/**
	 * @param mode_sk the mode_sk to set
	 */
	public void setMode_sk(int mode_sk) {
		this.mode_sk = mode_sk;
	}
	/**
	 * @return the is_function
	 */
	public boolean isIs_function() {
		return is_function;
	}
	/**
	 * @param is_function the is_function to set
	 */
	public void setIs_function(boolean is_function) {
		this.is_function = is_function;
	}
	/**
	 * @return the button
	 */
	public String getButton() {
		return button;
	}
	/**
	 * @param button the button to set
	 */
	public void setButton(String button) {
		this.button = button;
	}
	/**
	 * @return the execute
	 */
	public String getExecute() {
		return execute;
	}
	/**
	 * @param execute the execute to set
	 */
	public void setExecute(String execute) {
		this.execute = execute;
	}
	@Override
	public String[] getValues() {
		String[] values = new String[5];
		values[0] = new Integer (getMapping_sk()).toString();
		values[1] = new Integer (getMode_sk()).toString();
		values[2] = getStringValue(is_function);
		values[3] = getButton();
		values[4] = getExecute();
		
		return values;
	}
	@Override
	public String[] getFields() {
		return FIELDS;
	}
	@Override
	public int[] getDataTypes() {
		return DATATYPES;
	}
	
	
}
